package cn.kilo.domain.repository;

import cn.kilo.domain.model.login.vo.LoginVo;
import cn.kilo.domain.model.login.vo.RegisterVO;
import cn.kilo.domain.model.login.vo.UserVO;
import cn.kilo.domain.model.order.entity.*;
import cn.kilo.domain.model.order.res.*;
import cn.kilo.domain.model.order.vo.OrderStatusVO;
import cn.kilo.types.model.Response;

import java.util.Collection;
import java.util.List;
import java.util.Map;

/**
 * @author kilok
 * 策略仓储服务
 */
public interface IStrategyRepository {

     boolean register(RegisterVO registerVO);

     Response<?> login(LoginVo loginReq);

    Boolean updateUserInfo(UserVO userVO);

    UserEntity queryUserEntityByUserId(String userId);

    Boolean saveOrder(OrderStatusVO orderStatusVO, String userId);

    UserRes getUserInformation(String userId);

    int getCreateOrderByRidgepole(OrderEntity orderEntity);

    OrderEntity queryOrderByOrderId(Long orderId);

    Boolean updateOrder(OrderStatusVO orderStatusVO, String staffKey, String staffId);

    String queryUserNameById(String sorter1Id);

    Object[] getTokenOrder(OrderEntity build);

    Collection<Object> getOrderByQRCode(OrderEntity build);


    Collection<Object> queryGuardOrder(OrderEntity build);

    OrderRes takeOrder(OrderEntity order);

    void saveUserImage(String url, String userId);

    List<DepartmentRes> getDepartment();

    Boolean saveOrderInfoPicture(Long orderId, String url);

    Integer judgeRoute(String start, String ridgepole);

    DepartmentRes getDepartmentAndFloor(String ridgepole);

    Boolean takeOder(Long orderId,String ridgepole);

    OrderStatusVO getOrderStatusEntity(String cacheKey);

    void savePicture(String url, Long orderId);

    boolean checkPicture(Long orderId);

    OrderStaffEntity takeQueueValue();

    void updateOrderStaffStock(OrderStaffEntity orderStaffEntity);

    void addOrderStaffStockQueue(OrderStaffEntity orderStaffEntity);

    Collection<Object> takeOrderFromGuard(OrderEntity orderEntity);

    Collection<Object> getOrderInfoList(OrderEntity build);

    void removeSortedSetOrderInfo(Long orderId, String staffKey);

    OrderStatusVO userGetOrderInfo(OrderEntity build);

    List<OrderStatusVO> getUserOrder(String userId, String status);

    boolean judgeOrder(OrderJudgeEntity orderJudgeEntity);

    void updateOrderStatus(OrderEntity order);

    OrderStatusVO getOrderInfoAndDelete(OrderEntity build);

    String getUserRole(String userId);


    void UpdateStaff();

    void deleteStaff();

    StaffEntity queryStaffById(String sorter1);

    boolean checkKey(String s,String ridgepole);

    void deleteStaffKey(String sorter1);

    String getOrderNumber();

    Map<StaffEntity,List<OrderStaffEntity>> updateSalary();

    void addOrderInfo(OrderStatusVO orderStatusVO);

    OrderStatusVO takeOrderInfo();

    String getStaffIdByRidgepole(String ridgepole);

    void setOrderError(Long orderId);

    void updateDailySalary(List<StaffSalaryEntity> salaryEntities);

    String setWeather(String userId, String weather);

    List<JudgeRes> getBadJudge(String type);

    Map<String, Integer> getSorter1Staff(OrderEntity order);

    Map<String, Integer> getGuardStaff(OrderEntity order);

    Map<String, Integer> getSorter2Staff(OrderEntity order);

    boolean beSorter1(StaffEntity staffEntity);

    boolean checkStaff(StaffEntity staffEntity);

    Integer getGroupId(String department);

    boolean checkGuard(StaffEntity staffEntity);

    boolean beGuard(StaffEntity staffEntity);

    boolean checkSorter2(StaffEntity staffEntity);

    boolean beSorter2(StaffEntity staffEntity);

    void setOrderPayEd(Long orderId);

    boolean setLocation(UserEntity entity);

    StaffEntity registerToStaff(StaffEntity staffEntity);

    List<OrderStatusVO> getWaitPaySet();

    List<DepartRes> getDepartmentGroup();

    List<OrderStatusVO> getOrderByNumber(Integer number, String ridgepole);

    String getStaffNameById(String guardId);

    String getFloor(String ridgepole, Integer floor);

    void deleteOrderFromDepartment(Long orderId, String ridgepole, String end);

    List<String> getPosition();

    List<FloorRes> getFloorByRidgepole(String ridgepole);

    String getStaffIdByName(String sorter1);

    void deleteStaffOrderInfo(String sorter1Id, OrderStatusVO orderStatusVO);

    String getRidgepoleById(String guard);

    StaffRes getStaff(String staffId);

    JudgeOfProblemRes problem(UserEntity build);

    boolean updateProlemPicture(String judgeId, String image);

    boolean setPost(UserEntity build);

    void getAllOrder(OrderEntity build);

    Long getAllSalary();

    Long getMonthSalary();

    Integer getUserNumber();

    Integer getMothUser();

    Long getAllMoney();

    Long getMothMoney();

    Long getAllOutcome();

    Long getMothOutcome();

    List<MUserRes> getAllUsers();

    void setMothTime();

    List<MUserRes> getUserBy(MUserEntity build);

    List<MRiderRes> getAllRider();

    List<MRiderRes> getRiderBy(MRiderEntity build);

    List<MGuardRes> getAllGuard();

    List<MGuardRes> getGuardBy(MGuardEntity build);

    List<MSorterRes> getAllSorter();

    List<MSorterRes> getSorterBy(MSorterEntity build);

}
